/************************ 类型 *********************************/
// 病友圈详情params参数类型

import { getHttp, postHttpParam } from ".."



export interface pathentCircleDetailParamsStart {
  sickCircleId: number;
}
// 病友圈详情回调参数类型
export interface pathentCircleDetailDataStart {
  id:number
userId:number
authorName:string
title:string
departmentId:number
departmentName:string
disease:string
detail:string
treatmentHospital:string
treatmentStartTime:number
treatmentEndTime:number
treatmentProcess:string
picture:string
amount:number
content:string
whetherContent:number
}
// 结果页返回数据类型
export interface pathienCirclehistoryList {
  sickCircleId: number;
  userId?: number;
  title: string;
  detail: string;
  releaseTime: number;
  collectionNum: number;
  commentNum: number;
  amount: number;
}

// 问诊类型
export interface KnowledgeBaseRawState {
  departmentName: string;
  id: number;
  pic: string;
  rank: number;
}
// 病症类型
export interface KnowlegeListItem {
  departmentId: number;
  id: number;
  name: string;
}
/************************ 类型 *********************************/
// 病友圈首页列表类型
export interface pathienCircleHomeList {
  sickCircleId: number;
  title: string;
  detail: string;
  releaseTime: number;
  amount: number;
}
// 病友圈首页参数类型
export interface pathienCircleHomeListRawState {
  departmentId: number;
  page: number;
  count: number;
}

// 病友圈列表参数
export interface CommentListParamsState {
  sickCircleId: number;
  page: number;
  count: number;
}

export interface CommentStart{
  sickCircleId: number;
  content:string
}


/************************ 接口 *********************************/
// 病友圈首页列表接口
export const getpathienCircle = (params: pathienCircleHomeListRawState) =>
  getHttp("/health/doctor/sickCircle/v1/findSickCircleList", params);

// 问诊咨询接口
export const getKnowledgeBase = () =>
  getHttp("/health/share/knowledgeBase/v1/findDepartment");


// 病友详情页数据接口接口
export const getpathentCircleDetail = (params: pathentCircleDetailParamsStart) => getHttp("/health/doctor/sickCircle/v1/findSickCircleInfo", params);

// 查询病友圈评论列表
export const getCircleComment = (params: CommentListParamsState) =>
  getHttp("/health/user/sickCircle/v1/findSickCircleCommentList", params);


export const postComment = (params:CommentStart ) =>
postHttpParam("/health/doctor/sickCircle/verify/v1/publishComment", params,{});




